var goHighLight = function () {
    $('pre').each(function(i, block) {
        hljs.highlightBlock(block);
    });
};
$(document).ready(function () {
    $("input[type=search]").bind('input propertychange',function () {
        var searchWords = $(this).val();
        var items = $('.content>ul.table-view>li.table-view-cell');
        if(!items || (items.length == 0)) {
            return;
        }
        //恢复其它
        items.show();
        //开始筛选
        items.each(function (i,e) {
            var content = $(e).find('div.media-body').text();
            if(content.indexOf(searchWords) <= -1) {
                $(e).hide();
            }
        });
    });
    goHighLight();
    //css style fix
    //table
    var $table = $("table");
    $table.removeAttr('style');
    $table.removeAttr('height');
    $table.removeAttr('width');
    $table.addClass("table").addClass("table-responsive").attr('border','1');
    //img
    var $img = $("img");
    $img.removeAttr("height");
    $img.removeAttr("width");
    $img.css('width','100%');
});